<?php
if (!defined('_PS_VERSION_'))
  exit;
 
class phHomeSlider extends Module
  {
	public function __construct()
    {
		$this->name = 'phhomeslider';
		$this->tab = 'Test';
		$this->version = 1.0;
		$this->author = 'Hayani Mehdi';
		$this->need_instance = 0;
	 
		parent::__construct();
	 
		$this->displayName = $this->l('Pharmacie Home Slider');
		$this->description = $this->l('Module pour la section defillement dimages');
    }
 
	public function install()
	{
		if (parent::install() == false OR !$this->registerHook('leftColumn'))
			return false;
		return true;
	}
	
	public function hookLeftColumn($params)
	  {
		  global $smarty;
		  $this->context->controller->addCSS(($this->_path).'engine1/style.css', 'all');
		  /* $this->context->controller->addJS($this->_path.'engine1/script.js');
		  $this->context->controller->addJS($this->_path.'engine1/wowslider.js'); */

		  return $this->display(__FILE__, 'phhomeslider.tpl');
	  }
	 
	public function hookRightColumn($params)
	  {
		return $this->hookLeftColumn($params);
	  }
	
	public function hookHeader($params)
	  {
		return $this->hookLeftColumn($params);
	  }

	public function hookHome($params)
	  {
		return $this->hookLeftColumn($params);
	  }
	
	public function uninstall()
	{
		if (!parent::uninstall())
			Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'phhomeslider`');
		parent::uninstall();
	}
  	

  }
  
?>